package main


import (
	"fmt"
)

//没看懂
type Pet interface {
	Name() string
	Category() string
}

type Dog struct {
	name string
}

func (dog *Dog) SetName(name string){
	dog.name = name
}

func (dog Dog) Name() string {
	return dog.name
}

func (dog Dog) Category() string {
	return "dog"
}

func main() {
	var dog1 *Dog //dog1 为 nil
	if dog1 == nil {
		fmt.Println("The first dog is nil.")//执行这句
	} else {
		fmt.Println("The first dog is not nil.")
	}

	dog2 := dog1
	if dog2 == nil {
		fmt.Println("The second dog is nil.")
	}else {
		fmt.Println("The second dog is not nil.")
	}


}